:root {
    --server-bg: hsl(190, 60%, 80%);
}

body {
    font-size: 15px;
}

.math {
    font-family: "Times New Roman", serif;
    font-style: oblique;
}
input.long {
    width: 36em;
    font-family: "Courier", monospace;
}
input.right {
    text-align: right;
}
input:read-only {
    background-color: transparent;
    border-color: transparent;
}
.hidden {
    visibility: hidden;
}
.float-right {
    float: right;
}

.squish {
    font-family: "Courier", monospace;
    letter-spacing: -1px;
}

.qa {
    margin-top: 12px;
    display: inline-block;
    font-family: "Baskerville", sans-serif;
    font-size: 3em;
    line-height: .9em;
    color: #666;
}

.container > h1:after {
    content: "\00a0❧";
}
.container > h1:before {
    content: "❧\00a0";
}
.container > h1, .container > h3, .container > h4 {
    text-align: center;
    padding: 10px;
    max-width: 800px;
    margin: 0 auto;
}
h4 {
    font-style: italic;
    font-family: serif;
}

img.cute-graph {
    margin: 30px auto 10px;
    max-width: 70%;
    max-height: 70%;
    border: 1px solid #666;
    box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 2px;
    border-radius: 10px;
}

.section h3:before {
    content: "❡\00a0";
    color: #666;
}

.section h3 {
    margin: 0 0 15px 0;
}

.section {
    color: #111;
    font-size: 14px;
    margin: 1.5em auto;
    background-color: var(--server-bg);
    padding: 1em;
    border-radius: 1em;
    border: 2px solid transparent;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.outerblock {
    font-size: 16px;
    max-width: 600px;
    margin: 1em auto;
}
.outerblock p {
    text-align: center;
}

.calculator form {
    max-width: 48em;
    display: block;
    margin: 1em auto;
    padding: 1em;
    font-size: 14px;
    background-color: antiquewhite;
    border: 2px solid #b6a083;
    border-radius: 1em;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.calculator .calculator-title {
    font-weight: bold;
}
.calculator table td {
    padding: 2px;
}

.calculator table td:first-child {
    text-align: right;
    min-width: 8em;
}

.calculator button {
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    margin: 2px 0;
    display: inline-block;
    text-align: center;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    padding: 3px 11px 4px;
    text-shadow: 1px 1px 1px rgba(255,255,255,.3);
    border-radius: 7px;
    box-shadow: 1px 1px 1px rgba(0,0,0,.3);

    color: #111;
    border: solid 1px #c5a884;
    background: bisque;
    background: linear-gradient(180deg, #f8e8d5 1%, #f5ddc3 100%);
}
.calculator button:hover {
    background: bisque;
    background: linear-gradient(180deg, #f5ddc3 1%, #f8e8d5 100%);
}
.calculator button:active {
    position: relative;
    top: 1px;
}

table.table td, table.table th {
    border-color: #666 !important;
}
table.table-not-full {
    width: auto;
}

.diagram {
    padding: 1em;
}

xtt {
    font-family: monospace;
}

/***** tooltip *****/

.help-tooltip {
    display: inline-block;
    position: relative;
    font-size: 75%;
    top: -.5em;
    text-align: center;
    min-width: 1.4em;
    color: #444;
    background-color: #f8e8d5;
    border-radius: 10px;
    border: #c5a884 1px solid;
    user-select: none;
    cursor: help;
}

.help-tooltip[data-tooltip-text]:hover:after {
    text-align: left;
    background-color: #000;
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 3px 1px rgba(50, 50, 50, 0.4);
    border-radius: 5px;
    color: #ffffff;
    font-size: 12px;
    content: attr(data-tooltip-text);

    top: 130%;
    right: -1em;
    padding: 7px 12px;
    position: absolute;
    width: auto;
    min-width: 11em;

    z-index: 9999;
}

/***** sizing and positioning *****/

.pb1 {
    padding-bottom: 1em;
}
.mb1 {
    margin-bottom: 1em;
}

/***** header *****/

.header {
    width: 100%;
    margin: 0;
    padding: 2px;
    border-bottom: 1px solid grey;
    background-color: bisque;
    color: #444;
    line-height: 20px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    text-align: right;
}
.header a, .header a:visited, .header a:hover {
    text-decoration: none;
    color: #444;
}
.header a.this-page:before {
    content: "❧\00a0";
}
.header a, .header span {
    margin-right: 0.5em;
}
.header a.this-page {
    font-weight: bold;
}

/***** responsive *****/

.flex-container {
    display: flex;
    width: 100%;
}

@media (max-width: 700px) {
    .flex-container {
        flex-direction: column;
    }
    .diagram {
        margin: 0 auto;
    }
    span.truncable {
        display: inline-block;
        max-width: 32em;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    input.truncable {
        max-width: 25em;
        text-overflow: ellipsis;
    }
    .calculator table td:first-child {
        min-width: inherit;
    }
    img.cute-graph {
        max-width: 96%;
        max-height: 96%;
        margin-left: 2%;
        margin-right: 2%;
    }
}

@media (max-width: 450px) {
    span.truncable {
        max-width: 18em;
    }
    input.truncable {
        max-width: 15em;
    }
}
